cmake_minimum_required(VERSION 3.22)

project(PH)
add_library(cbb_protocol INTERFACE)

# Enable CMake support for ASM and C languages
enable_language(C ASM)

add_subdirectory(cbb_ph_obj)
add_subdirectory(cbb_ph_mb)
add_subdirectory(cbb_ph_m01_dis)
add_subdirectory(cbb_ph_ymodem)

target_link_libraries(${CMAKE_PROJECT_NAME}
    cbb_ph_obj
    cbb_ph_mb
    cbb_ph_m01_dis
    cbb_ph_ymodem
)

target_include_directories(cbb_protocol INTERFACE

)

target_sources(cbb_protocol INTERFACE

)

# Validate that STM32CubeMX code is compatible with C standard
if(CMAKE_C_STANDARD LESS 11)
    message(ERROR "Generated code requires C11 or higher")
endif()


